<template>
    <view class="productSales">
        <view class="item" v-for="(item, index) in list" :key="index">
            <view class="i-time">{{ item.etime }}</view>
            <view
                class="items"
                v-for="(items, indexs) in item.ls"
                :key="indexs"
            >
                <image
                    :src="items.gdimg ? items.gdimg : img_buf"
                    mode=""
                ></image>
                <view class="items-data">
                    <view class="s-title">{{ items.gdname }}</view>
                    <view class="s-i-t" v-if="md != 15">{{
                        items.gd_brand
                    }}</view>
                    <view class="s-i-t" v-else>
                        <!-- <span class="mr10">{{ items.brand || '--' }}</span>|
                        <span class="mr10">{{ items.cattitle || '--' }}</span>|
                        <span class="ml10">{{ items.item_no || '--' }}</span> -->
                        {{
                            `${items.brand ? items.brand + " | " : ""} 
                            ${items.cattitle ? items.cattitle + " | " : ""} 
                            ${items.item_no ? items.item_no : ""}`
                        }}
                    </view>
                    <view class="s-num">
                        <text class="">共：{{ items.number_min || '--'}}</text>
                        <text class="s-n-p">总计：<span class="font_green">￥{{ items.amount || '0.00' }}</span></text>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
import staticConst from "../../js/const/StaticConst.js";

export default {
    props: ["list", "md"],
    data() {
        return {
            img_buf: staticConst.GOOD_IMG,
        };
    },
    created() {},
    methods: {},
};
</script>

<style lang="scss">
.productSales {
    .item {
        padding-bottom: 5px;
        .i-time {
            color: #999;
            font-size: 15px;
            border-bottom: 1px solid #eee;
            padding-left: 5px;
        }
        .items {
            display: flex;

            margin: 10px 0;
            image {
                width: 80px;
                height: 80px;
                border-radius: 5px;
            }
            .items-data {
                flex: 1;
                padding-left: 15px;
                font-size: 13px;
                color: #333;
                .s-title {
                    font-size: 16px;
                }
                .s-i-t {
                    color: #999;
                    .s-i-p {
                        padding: 0 10px;
                    }
                }
                .s-num {
                    .s-n-p {
                        padding-left: 10px;
                    }
                }
            }
        }
    }
}
</style>
